# -*- coding: utf-8 -*-

################################################################################
## Form generated from reading UI file '使用旋钮控制标签中的字体大小.ui'
##
## Created by: Qt User Interface Compiler version 5.15.2
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################

from PySide2.QtCore import *
from PySide2.QtGui import *
from PySide2.QtWidgets import *
from PySide2 import QtCore, QtGui, QtWidgets
import sys


class Ui_MainWindow(object):
    def setupUi(self, MainWindow):
        if not MainWindow.objectName():
            MainWindow.setObjectName(u"MainWindow")
        MainWindow.resize(800, 600)
        self.centralwidget = QWidget(MainWindow)
        self.centralwidget.setObjectName(u"centralwidget")
        self.widget = QWidget(self.centralwidget)
        self.widget.setObjectName(u"widget")
        self.widget.setGeometry(QRect(60, 110, 671, 211))
        self.horizontalLayout = QHBoxLayout(self.widget)
        self.horizontalLayout.setObjectName(u"horizontalLayout")
        self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
        self.dial = QDial(self.widget)
        self.dial.setObjectName(u"dial")
        # 对按钮进行设置
        self.dial.setMinimum(8)
        self.dial.setMaximum(72)
        self.dial.setNotchesVisible(True)
        # 为旋钮控件绑定信号（槽函数）--值发生变化信号发出
        self.dial.valueChanged.connect(self.setfontsize)

        self.horizontalLayout.addWidget(self.dial)

        self.label = QLabel(self.widget)
        self.label.setObjectName(u"label")


        self.horizontalLayout.addWidget(self.label)

        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QMenuBar(MainWindow)
        self.menubar.setObjectName(u"menubar")
        self.menubar.setGeometry(QRect(0, 0, 800, 26))
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QStatusBar(MainWindow)
        self.statusbar.setObjectName(u"statusbar")
        MainWindow.setStatusBar(self.statusbar)

        self.retranslateUi(MainWindow)

        QMetaObject.connectSlotsByName(MainWindow)
    # setupUi

    def retranslateUi(self, MainWindow):
        MainWindow.setWindowTitle(QCoreApplication.translate("MainWindow", u"\u4f7f\u7528\u65cb\u94ae\u63a7\u5236\u6807\u7b7e\u4e2d\u7684\u5b57\u4f53\u5927\u5c0f", None))
        self.label.setText(QCoreApplication.translate("MainWindow", u"\u6562\u60f3\u6562\u4e3a\uff0c\u6ce8\u91cd\u7ec6\u8282", None))
    # retranslateUi

    def setfontsize(self):
        value = self.dial.value()
        self.label.setFont(QtGui.QFont('楷体', value))


if __name__ == '__main__':
    app = QtWidgets.QApplication(sys.argv)
    MainWindow = QtWidgets.QMainWindow()
    ui = Ui_MainWindow()
    ui.setupUi(MainWindow)
    MainWindow.show()
    sys.exit(app.exec_())
